package com.wimcorp.magic.abilities.trigger;

import javax.persistence.Entity;

import com.wimcorp.magic.abilities.Ability;

@Entity
public class OnBlocked extends AbilityTrigger {

	public OnBlocked() {
	}

	public OnBlocked(Ability ability){
		super(ability);
	}
	
	public OnBlocked(OnBlocked abilityTrigger) {
		super(abilityTrigger);
	}

	@Override
	public void register() {
		getAbility().getPlayer().getCombatPhase().registeBlockerDeclareObserver(getAbility());
		
	}
	
	@Override
	public void unRegister() {
		getAbility().getPlayer().getCombatPhase().unRegisterBlockerDeclareObserver(getAbility());
		
	}
	
	public OnBlocked clone() {
		return new OnBlocked(this);
	}

}
